#!/bin/sh
#
# Add an error handler to catch up with a fault in the pdns-recursor script.

set -e

# Set the old version.
MODE=$1
OLDVERSION=$2

# Init script has errors in previous versions.
initscript_error() {

	# Versions older then 3.2-4 have a bug in the initscript.
	if dpkg --compare-versions "$OLDVERSION" lt-nl "3.2-4" &&
		[ "$MODE" = "failed-upgrade" ]; then

		return 0
	fi

	return $1
}

#DEBHELPER#

exit 0

